<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="进销存情况(采购任务)">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <div class="btn btn-default base-color">
                            <div title="导出">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                            <ul class="more-tool">
                                <li yb-download download-url="exportParam.allUrl" download-param="condition" download-duration="3" is-ajax="true">
                                    <i class="yb-icon ico-export-o"></i><span>导出全部</span> 
                                </li>
                            </ul>
                        </div>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="代理商名称" ng-model="condition.dealerName">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
                <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                    <div class="advance-search m-t-sm">
                        <div class="form-group clearfix m-b-none">
                            <label class="control-label"><span>提报开始月份</span>：</label>
                            <input type="text" class="form-control date-picker" ng-model="condition.startDate"
                                   datepicker-popup="{{'yyyy-MM'}}" datepicker-options="{datepickerMode:'month',minMode:'month'}"
                                   ng-click="endDateShow=false;startDateShow=!startDateShow"
                                   ng-change="checkDate(condition, 'startDate', 'endDate')"
                                   is-open="startDateShow" close-text="关闭" modal-size="small" readonly>
                        </div>
                        <div class="form-group clearfix m-b-none">
                            <label class="control-label"></label>
                            <label class="control-label wave-line">~</label>
                        </div>
                        <div class="form-group clearfix m-b-none">
                            <label class="control-label"><span>提报结束月份</span>：</label>
                            <input type="text" class="form-control date-picker" ng-model="condition.endDate"
                                   datepicker-popup="{{'yyyy-MM'}}" datepicker-options="{datepickerMode:'month',minMode:'month'}"
                                   ng-click="startDateShow=false;endDateShow=!endDateShow"
                                   ng-change="checkDate(condition, 'startDate', 'endDate')"
                                   is-open="endDateShow" close-text="关闭" modal-size="small" readonly>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x" style="height:82px;">
                        <table class="table-fixed border-none" width="1400">
                            <thead>
                                <tr>
                                    <th class="text-center" width="120" title="所属区域" rowspan="2">所属区域</th>
                                    <th class="text-center"
                                        ng-repeat="item in tbConf.firstTableCol track by $index"
                                        width="{{item.width}}" title="{{item.name}}" rowspan="{{item.rowSpan}}" colspan="{{item.colSpan}}">
                                        {{item.name}}
                                    </th>
                                </tr>
                                <tr>
                                    <th class="text-center border-top"
                                        ng-repeat="itemCol in tbConf.secondTableCol track by $index"
                                        width="{{itemCol.width}}" title="{{itemCol.name}}">
                                        {{itemCol.name}}
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" style="top:82px">
                        <table class="table-fixed border-none" width="1400">
                            <tbody ng-repeat="areaItem in dataList">
                                <tr ng-repeat="item in areaItem.areaData track by $index"
                                    ng-style="{background: !!item.areaCount?'#eee':''}" ng-class="{'yellow-bg': !!item.totalCount}">
                                    <td class="spill-dots" rowspan="{{ areaItem.areaData.length }}" ng-if="$index==0" width="120" title="{{item.area}}">
                                        <span>{{item.area}}</span>
                                    </td>
                                    <td class="spill-dots" ng-repeat="itemCol in tbConf.firstTableCol track by $index" ng-if="!!itemCol.rowSpan"
                                        width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                        <span>{{ item[itemCol.dataField] }}</span>
                                    </td>
                                    <td class="spill-dots" ng-repeat="itemCol in tbConf.secondTableCol track by $index"
                                        width="{{itemCol.width}}" title="{{item[itemCol.dataField]}}">
                                        <span>{{ item[itemCol.dataField] }}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" style="top:82px">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
    </div>
</div>